
//////////////////////////////////////////////////////////////////////
#ifndef _TEXTURE_H_
#define _TEXTURE_H_


#include "config.h"
#include "d3dheaders.h"
#include <string>
#include "video/RelCounted.h"

namespace KEngine
{
	class Device;
	class _KExport Texture : public RefCounted
	{
	public:
		Texture();
		virtual ~Texture();

		bool loadFromFile(Device* device ,const char* filename);
		void setTexture(ID3DTexture* tex);

		ID3DTexture* getTexture() const
		{
			return _texture;
		}
		unsigned int getWidth() const;
		unsigned int getHeight() const;

		const char* getName() const {return _name.c_str();} 

	protected:
		ID3DTexture* _texture;
		D3DSURFACE_DESC _surfaceDesc;
		std::string _name;
	};
	
};

#endif

